package com.jd.mti.beetl.test.load;

import org.beetl.core.GroupTemplate;
import org.beetl.core.resource.ClasspathResourceLoader;

import java.util.Map;

/**
 * @Author sizegang
 * @Date 2021/11/14 20:30
 * @Version 1.0
 */
public class MyClasspathResourceLoader  extends ClasspathResourceLoader {
    public MyClasspathResourceLoader(String root) {
        super(root);
    }

    @Override
    public void init(GroupTemplate gt) {
        Map<String, String> resourceMap = gt.getConf().getResourceMap();

        if (this.charset == null) {
            this.charset = resourceMap.get("charset");

        }

        this.setAutoCheck(false);

    }
}
